#include "KMP.hpp"
#include <ctime>

void run(){
    time_t begin, end;

    vector<string> input(10);
    string s1;
    for (size_t i = 0; i < 10; i++)
    {
        getline(cin, input[i]);
    }

    for (size_t i = 0; i < 5; i++)
    {
        cout << "case" << i+1 << endl;
        auto matcher = KMP_Matcher(input[2*i+1], input[2*i]);

        begin = clock();
        matcher.run_KMP_Matcher();
        end = clock();

        matcher.print_pi();

        cout << "time = " << end - begin << endl << endl;
    }
}

int main(){
    run();
}